/*
 * Alloy Analyzer
 * Copyright (c) 2002 Massachusetts Institute of Technology
 *
 * The Alloy Analyzer is free software; you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by
 * the Free Software Foundation; either version 2 of the License, or
 * (at your option) any later version.
 *
 * The Alloy Analyzer is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 *
 * You should have received a copy of the GNU General Public License
 * along with the Alloy Analyzer; if not, write to the Free Software
 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
 */

package alloy.symm;

import java.util.Set;
import java.util.TreeSet;

import alloy.ast.ASTDepthFirstVisitor;
import alloy.ast.Expr;
import alloy.ast.LeafExpr;
import alloy.transl.TranslInfo;

/**
 * Statically detects {@link Expr}s that are homogeneous binary relations
 * constrained to be permutations, i.e. !->! relations.  Special-case
 * symmetry breaking is possible for permutations.
 */
class PermutationDetector_V extends ASTDepthFirstVisitor {
    private Set /* of Expr */ _permutations = new TreeSet();

    PermutationDetector_V(TranslInfo translInfo_) { }

    public void visit(LeafExpr leafExpr_) {
// 	if (leafExpr_.nodeString().equals("rightNeighbor"))
// 	    _permutations.add(leafExpr_);
    }
    
    Set getPermutations() {
	    return _permutations;
    }
}

